<%@ Page Language="C#" MasterPageFile="~/DoctorForum.Master" AutoEventWireup="true"
    Codebehind="ViewForum.aspx.cs" Inherits="WebForum.ViewForum" Title="Doctor Forum" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <div class="forumTitle">
        <asp:Label ID="LabelForumTitle" CssClass="Title" runat="server" Text=""></asp:Label>
        -
        <asp:Label ID="LabelForumContent" CssClass="Desc" runat="server" Text=""></asp:Label>
    </div>
    <%--All SubForum--%>
    <div class="forumContent">
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" DataSourceID="ObjectDataSource1"
            PageSize="25" AutoGenerateColumns="False" ShowHeader="False" Width="100%">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#"ViewSubForum.aspx?id="+Eval("Id")%>'
                            Text='<%# DataBinder.Eval(Container.DataItem,"Title") %>'></asp:HyperLink>
                        <br />
                        <asp:Label ID="LabelDesc" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Desc") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <%--DataSource For SubForum--%>
    <asp:ObjectDataSource ID="ObjectDataSource1" TypeName="WebForum.App_Data.ForumDataSource"
        SelectMethod="List" runat="server">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="pId" QueryStringField="id" Type="Int32" />            
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
